Merged
Conversation
Closed
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new ping command to display bot latency metrics, including gateway heartbeat latency, REST API latency, and message send latency. The command is available both as a text command (!ping) and a slash command (/ping).
Key changes:
- Implemented ping command with both text and slash command interfaces
- Added internationalization support for English and French
- Integrated ShardManager into the bot context for accessing gateway latency
- Applied code formatting improvements in config.rs
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| rustmail/src/bot.rs | Added ShardManagerKey type and integration, updated random number generation API |
| rustmail/src/commands/ping/text_command/ping.rs | Implemented text-based ping command with latency measurement |
| rustmail/src/commands/ping/slash_command/ping.rs | Implemented slash command version of ping with latency measurement |
| rustmail/src/commands/ping/text_command/mod.rs | Module export for text command |
| rustmail/src/commands/ping/slash_command/mod.rs | Module export for slash command |
| rustmail/src/commands/ping/mod.rs | Main module file for ping command |
| rustmail/src/commands/mod.rs | Registered ping command module |
| rustmail/src/handlers/guild_messages_handler.rs | Added ping to text command handler |
| rustmail/src/i18n/language/en.rs | Added English translations for ping command |
| rustmail/src/i18n/language/fr.rs | Added French translations for ping command |
| rustmail/src/utils/message/message_builder.rs | Modified edit message builder to set empty content when using embeds |
| rustmail/src/config.rs | Code formatting improvements for readability |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fb9fddd to
7978a8c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a ping command to display the latency between the bot and the Discord gateway (heartbeat latency).